import pkuseg
import gensim
import re
import openpyxl

way = dict()
excel_file="D://药剂.xlsx"
wb = openpyxl.load_workbook(excel_file)
sh= wb['工作表1']

with open('D://皮炎参数//way.txt') as f:
    lines = f.readlines()
f.close()

ways=[]
size=0
for line in lines:
    line = line.strip('\n')
    way[str(line)]=size
    ways.append(str(line))
    size=size+1
print(ways)
b=[0]*213
for i in range(2,202):
    b=[0]*213
    s= str(sh.cell(i,21).value)
    for l in ways:
        if s.find(l)!= -1:
            b[way[l]]=float(1)
    print(b)